3. 数猫にカットを入れる
code: koneko.py
from paper import mm, A4, myCanvas, draw
for i in range(9):
for j in range(9):
if n != 0:
draw(n, i, j)
from PIL import Image
im1 = Image.open("cut.jpg").convert("L")
ix, iy = im1.size
width = 100 * mm
height = width * iy / ix
myCanvas.drawInlineImage(im1,
15 * mm,
width = width,
height = height)
myCanvas.save()
https://gyazo.com/13d3405a4b4529a2b8d03d03c69d0f13